* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #1e1e1e;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式优化 */
.sidebar {
    width: 280px; /* 增加侧边栏宽度 */
    background-color: #1e1e1e;
    color: #fff;
    padding: 20px 0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid #333;
}

.logo {
    padding: 0 30px;
    height: 80px; /* 增加logo区域高度 */
    display: flex;
    align-items: center;
    font-size: 22px; /* 增大logo字体 */
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid #333;
    margin-bottom: 30px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.nav-item {
    padding: 20px 30px; /* 增加导航项内边距 */
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    display: block;
    transition: all 0.3s;
    font-size: 18px; /* 增大导航项字体 */
    letter-spacing: 1px;
    font-weight: 500;
}

.nav-item:hover {
    color: #fff;
    background-color: rgba(44, 92, 255, 0.2);
}

.nav-item.active {
    color: #fff;
    background-color: #2c5cff;
}

/* 主要内容区样式优化 */
.main-content {
    flex: 1;
    margin-left: 280px; /* 匹配侧边栏宽度 */
    padding: 30px; /* 增加内容区内边距 */
    background-color: #f5f5f5;
}

.search-section {
    background: white;
    padding: 30px; /* 增加搜索区域内边距 */
    border-radius: 16px; /* 增大圆角 */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); /* 增强阴影效果 */
}

.search-section h2 {
    font-size: 24px; /* 增大标题字体 */
    margin-bottom: 30px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-type {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.type-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
}

.type-btn.active {
    background: #2c5cff;
    color: white;
}

.search-input {
    display: flex;
    gap: 10px;
}

.search-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.search-btn {
    padding: 10px 20px;
    background: #2c5cff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.file-upload {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload label {
    cursor: pointer;
    display: block;
}

.upload-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.results-section {
    margin-top: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.result-item {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-item img, 
.result-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar .logo span,
    .nav-item span {
        display: none;
    }
    
    .main-content {
        margin-left: 80px;
    }
}

/* 删除不需要的样式 */
.nav-group,
.nav-title {
    display: none;
}

/* 文本检索特定样式 */
.text-search-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-options {
    display: flex;
    gap: 20px;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

/* 语音检索特定样式 */
.audio-search-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.audio-input-section {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.audio-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.record-btn, .stop-btn, .play-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.record-btn {
    background-color: #dc3545;
    color: white;
}

.stop-btn {
    background-color: #6c757d;
    color: white;
}

.play-btn {
    background-color: #28a745;
    color: white;
}

.record-btn:disabled, .stop-btn:disabled, .play-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.audio-visualizer {
    width: 100%;
    height: 150px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
    overflow: hidden;
}

.audio-visualizer canvas {
    width: 100%;
    height: 100%;
}

.audio-player {
    width: 100%;
    margin: 20px 0;
}

.audio-player audio {
    width: 100%;
    border-radius: 8px;
}

.audio-upload {
    border: 2px dashed #e0e0e0;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    margin: 20px 0;
    transition: all 0.3s;
}

.audio-upload:hover {
    border-color: #2c5cff;
    background: rgba(44, 92, 255, 0.05);
}

.audio-upload input[type="file"] {
    display: none;
}

.audio-upload label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #666;
}

.audio-upload i {
    font-size: 40px;
    color: #2c5cff;
}

.recognition-result {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.recognition-result h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.transcript-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    min-height: 100px;
}

.transcript-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* 结果项样式 */
.result-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-audio {
    flex: 0 0 200px;
}

.result-audio audio {
    width: 100%;
}

.result-content {
    flex: 1;
}

.result-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.result-info {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.result-text {
    color: #666;
    line-height: 1.6;
}

.result-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 4px;
}

/* 结果展示样式优化 */
.no-results {
    text-align: center;
    color: #666;
    padding: 20px;
}

.result-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* 文本检索页面特定样式 */
.search-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 15px;
    transition: all 0.3s;
}

.search-input:focus-within {
    border-color: #2c5cff;
    box-shadow: 0 0 0 3px rgba(44, 92, 255, 0.1);
}

.search-input i {
    color: #666;
    margin-right: 10px;
}

.search-input input {
    flex: 1;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    outline: none;
}

.clear-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    display: none;
}

.clear-btn:hover {
    color: #666;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 25px;
    background: #2c5cff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #1a4aff;
}

/* 高级搜索选项 */
.advanced-search {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.search-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    cursor: pointer;
}

.option-item i {
    color: #2c5cff;
}

.search-filter {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.search-filter select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* 搜索历史 */
.search-history {
    margin-top: 20px;
}

.search-history h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-tag {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.history-tag:hover {
    background: #e0e0e0;
}

/* 结果展示区域 */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-stats {
    color: #666;
    font-size: 14px;
}

.results-filter {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.view-mode {
    display: flex;
    gap: 5px;
}

.view-mode button {
    padding: 8px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
}

.view-mode button.active {
    background: #2c5cff;
    color: white;
    border-color: #2c5cff;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
}

.pagination button.active {
    background: #2c5cff;
    color: white;
    border-color: #2c5cff;
}

.pagination button:hover:not(.active) {
    background: #f0f0f0;
}

/* 文本生成图像样式优化 */
.image-generation {
    margin-top: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.image-generation h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generation-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.generation-input textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    resize: vertical;
    font-size: 16px;
    min-height: 120px; /* 增加文本框最小高度 */
    transition: all 0.3s;
}

.generation-input textarea:focus {
    border-color: #2c5cff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 92, 255, 0.1);
}

.generation-options {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}

.generation-options select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    min-width: 150px; /* 设置最小宽度 */
}

.generate-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #2c5cff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.generate-btn:hover {
    background: #1a4aff;
}

.generation-result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.generation-result h4 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.generated-image {
    position: relative;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.generated-image img {
    width: 100%;
    max-width: 768px; /* 增大图片最大宽度 */
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.download-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.generation-info {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 16px;
    padding: 15px 0;
}

.loading {
    position: relative;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8) url('loading.gif') center no-repeat;
    border-radius: 8px;
}

/* 识别结果卡片样式更新 */
.card-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #666;
}

.card-header .card-actions {
    display: flex;
    gap: 10px;
}

.result-text {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: none;
    background: none;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    resize: vertical;
}

.result-text:disabled {
    background: none;
    color: #333;
}

.result-text:not(:disabled) {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.edit-btn,
.save-btn,
.cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.edit-btn {
    background: #2c5cff;
    color: white;
}

.save-btn {
    background: #28a745;
    color: white;
}

.cancel-btn {
    background: #dc3545;
    color: white;
}

.edit-btn:hover,
.save-btn:hover,
.cancel-btn:hover {
    opacity: 0.9;
}

.card-footer {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 语音识别按钮样式 */
.search-actions {
    margin-top: 20px;
    text-align: center;
}

.search-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    background-color: #2c5cff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-btn i {
    font-size: 18px;
}

.search-btn:hover {
    background-color: #1a4aff;
    transform: translateY(-1px);
}

.search-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.search-btn:disabled i {
    opacity: 0.7;
}

/* 生成图像按钮样式 */
.generate-image-btn {
    background: #28a745;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.generate-image-btn:hover {
    opacity: 0.9;
}

.generate-image-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* 生成图像结果样式 */
.generated-image-result {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.generated-image-result h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.generated-image {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.generated-image img {
    width: 100%;
    max-width: 512px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* 分析结果样式 */
.analysis-item {
    margin-bottom: 20px;
}

.analysis-item:last-child {
    margin-bottom: 0;
}

.analysis-item h4 {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.analysis-item p {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.recognition-card .card-header i {
    color: #2c5cff;
}

/* 图像检索样式 */
.image-search-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.image-input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-upload {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-upload:hover {
    border-color: #2c5cff;
    background: rgba(44, 92, 255, 0.05);
}

.image-upload input[type="file"] {
    display: none;
}

.image-upload label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.image-upload i {
    font-size: 48px;
    color: #2c5cff;
}

.image-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.analyze-actions {
    text-align: center;
    margin-top: 20px;
}

.analyze-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    background-color: #2c5cff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.analyze-btn:hover {
    background-color: #1a4aff;
    transform: translateY(-1px);
}

.analyze-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* 视频检索样式 */
.video-search-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.video-input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-upload {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.video-upload:hover {
    border-color: #2c5cff;
    background: rgba(44, 92, 255, 0.05);
}

.video-upload input[type="file"] {
    display: none;
}

.video-upload label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.video-upload i {
    font-size: 48px;
    color: #2c5cff;
}

.upload-hint {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.video-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.video-preview video {
    width: 100%;
    max-height: 400px;
    border-radius: 8px;
    background: #000;
}

.video-info {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.video-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-info span::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.file-name::before {
    content: "\f15b";
}

.file-size::before {
    content: "\f1c8";
}

.video-duration::before {
    content: "\f017";
}

/* 视频卡片样式 */
.video-card {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-2px);
}

.video-thumbnail {
    position: relative;
    width: 200px;
    height: 120px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    flex: 1;
    padding: 15px;
}

.video-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.video-source {
    color: #666;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #2c5cff;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.watch-btn:hover {
    background: #1a4aff;
}

.no-results, .error-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results i, .error-message i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #999;
} 